package com.haiyan.demo.problem04;

public class Yuan extends Graph {
    private int r;
    private final double PI=3.14;

    public Yuan() {
    }

    public Yuan(int r) {
        this.r = r;
    }

    public int getR() {
        return r;
    }

    public void setR(int r) {
        this.r = r;
    }

    @Override
    public double zhouChang() {
        return 2*PI*r;
    }

    @Override
    public double mianJi() {
        return PI*r*r;
    }
}
